package fh.app4stud.mensa.data;

import java.util.Comparator;

/**
 * Created by IntelliJ IDEA.
 * User: ivan plese
 * Date: 12.04.11
 * Time: 21:56
 * Version 1.0
 * To change this template use File | Settings | File Templates.
 */
public class LocationsSort {

    public static final Comparator<RestaurantLocation> CITY_ORDER = new Comparator<RestaurantLocation>() {
        public int compare(RestaurantLocation e1, RestaurantLocation e2) {
            return e2.getCity().compareTo(e1.getCity());
        }
    };


    public static final Comparator<RestaurantLocation> DISTANCE_ORDER = new Comparator<RestaurantLocation>() {
        public int compare(RestaurantLocation e1, RestaurantLocation e2) {
            return e2.getDistanceFromCurrentLocation().compareTo(e1.getDistanceFromCurrentLocation());
        }
    };


}
